<include file="../header" />
<body class="J_scroll_fixed">
<script>
        $(document).ready(function() {
            
             $('button.vieworder').click(function () {

                var id = $(this).attr("id");
                var shopId =$(this).attr("shopId");
                layer.open({

                    type: 2,
                    title: '查看课程销售记录',
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['80%', '98%'],
                    content: "{:U('coach/orderRecord')}&id="+id

                });
            });
            $('button.viewcourse').click(function () {

                var id = $(this).attr("id");
                layer.open({

                    type: 2,
                    title: '查看课程上课记录',
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['80%', '98%'],
                    content: "{:U('coach/courseRecord')}&coachId="+id

                });
            });
           $('button.coachPerform').click(function () {

                var id = $(this).attr("id");
 
                layer.open({

                    type: 2,
                    title: '教练绩效评估',
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['80%', '98%'],
                    content: "{:U('coach/coachPerform')}&coachId="+id

                });
            });
            $('button.viewperform').click(function () {

                var id = $(this).attr("id");
 
                layer.open({

                    type: 2,
                    title: '教练绩效评估记录',
                    maxmin: false,
                    shadeClose: true, //点击遮罩关闭层
                    area: ['80%', '98%'],
                    content: "{:U('coach/performRecord')}&coachId="+id

                });
            });
        });
    </script>
<form class="well form-search" method="post" style="float:left;width:100%;" action="{:U('coach/saleIndex')}">
    <div class="search_type cc mb10">
        <div class="mb10">
        <span class="mr20">
                    店铺选择：{:getShopSelectHtml($shopId,1)}
                    日期选择：
                    <input type="text" name="startTime" class="input length_2 J_date" value="{$startTime}" autocomplete="off">-<input type="text" name="endTime" class="input length_2 J_date" value="{$endTime}" autocomplete="off">
            <button class="btn btn-primary">搜索</button>
            <a class="btn" href="{:U('coach/saleIndex')}">重置</a>
        </span>
        </div>
    </div>
</form>
<div class="wrap J_check_wrap">
    
    <table class="table table-hover table-bordered">
        <thead>
        <tr>
            <th>编号</th>
            <th>店铺名称</th>
            <th>姓名</th>
            <th>手机号</th>
            <th>教练等级</th>
            <th>卖课数</th>
            <th>销售业绩</th>
            <th>卖课记录</th>
            <th>上课记录</th>
            <th>业绩记录</th>
            <th>绩效评估</th>
        </tr>
        </thead>
        <tbody>
        <foreach name="list" item="vo">
            <tr>
                <td>{$vo.coach_id}</td>
                <td>{$vo.shop_name}</td>
                <td>{$vo.coach_name}</td>
                <td>{$vo.mobile}</td>
                <td>{$vo.level_name}</td>
                <td>{$vo.number} 节</td>
                <td>{$vo.total_amount} 元</td>
                <td><button class="vieworder btn" id="{$vo['coach_id']}" shopId="{$vo['shop_id']}">查看</button></td>
                <td><button class="viewcourse btn" id="{$vo['coach_id']}" shopId="{$vo['shop_id']}">查看</button></td>
                <td><button class="viewperform btn" id="{$vo['coach_id']}" shopId="{$vo['shop_id']}">查看</button></td>
                <td><button class="coachPerform btn" id="{$vo['coach_id']}" >评估</button></td>
            </tr>
        </foreach>
        </tbody>
    </table>
    <div class="pagination">{$page}</div>
</div>
<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>